import request from "./request.js"


//首页接口
const getUsers = (queryModel) => request.get('users', { params: queryModel })

//首页添加
const addUser = (model) => request.post('users', model)

//修改
const updataList = (model) => request.put(`/users/${model.id}`, model)

//删除
const deleList = (id) => request.delete(`users/`+id)

//状态接口
const changeState=(id,state)=>request.put(`users/${id}/state/${state}`)


export {
    getUsers,
    addUser,
    updataList,
    deleList,
    changeState
}